package com.ruoyi.cpi.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.cpi.domain.Fcpi;
import com.ruoyi.cpi.service.IFcpiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@RequestMapping("/cpi/cpi")
public class FcpiController extends BaseController {
    @Autowired
    private IFcpiService fcpiService;
    /**
     * 查询预测CPI列表
     */
    @PreAuthorize("@ss.hasPermi('cpi:cpi:list')")
    @GetMapping("/futurelist")
    public TableDataInfo futurelist(Fcpi fcpi)
    {
        startPage();
        List<Fcpi> list = fcpiService.futurelist(fcpi);
        return getDataTable(list);
    }
}
